import { useNavigate, Link } from 'react-router-dom'
const Login = () => {
    const navigate = useNavigate()
    return <div>
        登录页
        {/* 声明式写法 */}
        <Link to='/article'>声明式：文章</Link>
        {/* 命令式写法 */}
        <button onClick={() => navigate(`/article`)}>编程式：文章</button>
        <button onClick={() => navigate(`/article?name=chuck`)}>编程式传参：文章</button>
        <button onClick={() => navigate(`/article/chuck/1001`)}>编程式params传参：文章</button>
    </div>
}
export default Login